<?php
if (!defined('BASEPATH'))
    exit('No direct script access allowed');
$this->load->view('header');
?>

<form id="file_upload_form" action="/albums/upload_image" method="POST" enctype='multipart/form-data' class="post_form">
	<p><strong>上传图片</strong></p>
	<p>
		<label for="album_id">图类：</label>
		<select name="album_id" id="album_id">
			<option value="1">宋可</option>
			<option value="2">程序</option>
			<option value="3">杂</option>
		</select>
	</p>
	<p>
		<lable for="image_description">描述：</lable>
		<input type="text" name="image_description" id="image_description" />
	</p>
	<!--p>
		<label for="">逆时针旋转：</label>
		<input type="radio" name="rotation_angle" value="90"/>90
		<input type="radio" name="rotation_angle" value="180"/>180
		<input type="radio" name="rotation_angle" value="270"/>270
		<input type="radio" name="rotation_angle" value="hor"/>水平
		<input type="radio" name="rotation_angle" value="vrt"/>垂直
	</p-->
	<p>
		<label for="album_userfile">图片：</label>
		<input type="file" name="userfile" id="album_serfile"/>
		<input type="submit" value="上传"/>
	</p>
</form>
<ul id="file_upload_list"></ul>
<script type="text/javascript" src="<?php echo base_url(); ?>js/Jquery/jquery.form.js"></script>
<script>
	function showResponse(data)  { 
		$('#file_upload_list').append(data+'\n');
	}
	$('document').ready(function(){
		var options = {
			success:       showResponse
		}
		$('#file_upload_form').ajaxForm(options); 
	});
</script>
<?php
$this->load->view('footer');